package com.TwinBlade.PicturePassword;

import android.app.ProgressDialog;
import android.graphics.Bitmap;
import android.graphics.Bitmap.Config;
import android.graphics.Canvas;
import android.os.AsyncTask;
import android.os.Environment;
import java.io.File;
import org.acra.ACRA;
import org.acra.ErrorReporter;

class u extends AsyncTask
{
  private u(Crop paramCrop)
  {
  }

  protected Boolean a(Void[] paramArrayOfVoid)
  {
    Crop.a(this.a, Crop.c(this.a).getDrawingCache(true));
    if (Crop.d(this.a) == null)
    {
      Crop.a(this.a, Bitmap.createBitmap(Crop.c(this.a).b, Crop.c(this.a).c, Bitmap.Config.ARGB_8888));
      Canvas localCanvas = new Canvas(Crop.d(this.a));
      Crop.c(this.a).layout(0, 0, Crop.c(this.a).b, Crop.c(this.a).c);
      Crop.c(this.a).draw(localCanvas);
    }
    File localFile1;
    if (Crop.d(this.a) != null)
      if (Environment.getExternalStorageState().equals("mounted"))
      {
        localFile1 = this.a.getExternalFilesDir(null);
        if (localFile1 == null)
        {
          localFile1 = new File(Environment.getExternalStorageDirectory() + "/PPAData");
          if (localFile1.exists());
        }
      }
    try
    {
      localFile1.mkdir();
      localFile2 = new File(localFile1, ".nomedia");
      if (localFile2.exists());
    }
    catch (Exception localException2)
    {
      try
      {
        File localFile2;
        localFile2.createNewFile();
        label219: File localFile3 = new File(localFile1, "PhotoData.jpg");
        Crop.a(this.a, localFile3, Crop.d(this.a));
        return Boolean.valueOf(Crop.b(this.a, Crop.d(this.a)));
        Utilities.a(Crop.a(this.a), this.a.getString(2131296438), 4, true);
        ACRA.getErrorReporter().a(new av("Getting TouchImageView Drawable Returned Null"));
        return Boolean.valueOf(false);
        localException2 = localException2;
      }
      catch (Exception localException1)
      {
        break label219;
      }
    }
  }

  protected void a(Boolean paramBoolean)
  {
    try
    {
      Crop.b(this.a).dismiss();
      label10: Crop localCrop = this.a;
      if (paramBoolean.booleanValue());
      for (int i = -1; ; i = 0)
      {
        localCrop.setResult(i);
        this.a.finish();
        return;
      }
    }
    catch (Exception localException)
    {
      break label10;
    }
  }

  protected void onPreExecute()
  {
    Crop.a(this.a, ProgressDialog.show(Crop.a(this.a), this.a.getString(2131296436), this.a.getString(2131296437), true));
    Crop.b(this.a).setCancelable(false);
    Crop.b(this.a).show();
    Crop.c(this.a).setDrawingCacheEnabled(true);
    Crop.c(this.a).buildDrawingCache(true);
  }
}

/* Location:           D:\Studium\Bachelorarbeit\BA Marcus Wobig\BA\BA\Decompiler\PicturePassword APK\Programm\PicturePassword_dex2jar.jar
 * Qualified Name:     com.TwinBlade.PicturePassword.u
 * JD-Core Version:    0.6.2
 */